<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app">
  
  </div>
</body>
<script src="./node_modules/vue/dist/vue.js"></script>
<!-- 1.引入 vuex 依赖 -->
<script src="./node_modules/vuex/dist/vuex.js"></script>
<script src="./node_modules/axios/dist/axios.js"></script>
<script>

  let moduleA = {
    state:{
      num:123
    },
    mutations:{},
    actions:{},
    getters:{},
  }
  let moduleB = {
    state:{
      num:456
    },
    mutations:{},
    actions:{},
    getters:{},
  }

  let store = new Vuex.Store({
    modules:{
      a:moduleA,
      b:moduleB
    }
  })
  console.log(store.state.a.num);
  console.log(store.state.b.num);
  let vm = new Vue({
    store,
    el:"#app",
  })



</script>
</html>